package com.xiaogang.minio.controller;

import com.xiaogang.minio.model.UploadParam;
import com.xiaogang.minio.service.MinioService;
import com.xiaogang.minio.utils.APIRs;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ProjectName : minio
 * @作者 : 侯小刚
 * @描述 :
 * @创建日期 : 2023/7/26 18:14
 */
@RestController
@RequestMapping("/xiaogang/minio/")
public class MinioController {

    @Autowired
    private MinioService minioService;

    @PostMapping("/upload")
    public APIRs upload(@RequestBody UploadParam param) {
        return minioService.uploadFileMinio(param);
    }

}
